<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:fb="http://ogp.me/ns/fb#"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:p="http://primefaces.org/ui"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://xmlns.jcp.org/jsf/html ">
<h:head>
    <title>Spela tennis - Stockholm</title>
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet"/>
    <meta property="og:title" content="playtennis.se - Stockholm"/>
    <meta property="og:url" content="http://www.playtennis.se"/>
    <meta property="og:description" content="En sammanställning av tennishallar och lediga tennistider i Stockholm"/>
    <meta property="og:image" content="http://www.playtennis.se/tennis_stockholm_preview.png"/>

    <meta name="keywords" content="tennis, stockholm, bokning, tennishallar, tennisbanor"/>
    <meta name="description" content="En sammanställning av tennishallar och lediga tennistider i Stockholm"/>

    <script type="text/javascript" language="JavaScript" src="jquery.js"></script>
    <script type="text/javascript" language="JavaScript" src="blockUI.js"></script>

    <script type="text/javascript">
        function block() {
            $.blockUI.defaults.overlayCSS.opacity = .1;
            $.blockUI({ message: '<img alt="Hämtar tillgängliga tennisbanor" src="ajaxloading.gif" /> Loading...' });
        }
    </script>
    <style type="text/css">
        html {
            font-family: Arial, sans-serif;
            font-size: 62.5%;
            text-align: center;
        }

        .topcontainer {
            height: 100%;
            box-sizing: border-box;
            -moz-box-sizing: border-box;
            -o-box-sizing: border-box;
            -webkit-box-sizing: border-box;
            box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3);
            background-color: #585858;
            max-width: 100rem;
            text-align: center;
            border-radius: 4px;
            padding-bottom: 2px;
            margin: 0 auto 12px;
        }

        .container {
            height: 100%;
            padding-top: 20px;
            padding-bottom: 20px;
            box-sizing: border-box;
            -moz-box-sizing: border-box;
            -o-box-sizing: border-box;
            -webkit-box-sizing: border-box;
            box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3);
            background-color: #FFFFFF;
            max-width: 100rem;
            margin: 0 auto;
            border-radius: 4px;
        }
        .availabilityTable {
            margin-bottom: 10px;
        }

        .availabilityTable td a {
            display: block;
            height: 100%;
            width: 100%;
            text-decoration: none
        }

        .availabilityTable td A:hover {
            background-color: #10CC36;
            border-radius: 3px 3px 3px 3px;
        }

        .maplink {
            text-align: center;
        }

        .maplink a:hover {
            background-color: #FFFFFF;
        }

        .calendarbutton {
            height: 40px;
            width: 40px;
        }

        h1 {
            font-family: 'LeagueGothicRegular', Arial, sans-serif;
            letter-spacing: 0;
            text-transform: uppercase;
            font-size: 4em;
            color: #FFFFFF;
            margin-bottom: 0;
        }

        h2 {
            color: #EBEBEB;
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            font-size: 1.8em;
        }

        .rf-cal-popup {
            cursor: default;
        }

        .dateNavButton {
            -moz-box-shadow: inset 0px 0px 0px 0px #c1ed9c;
            -webkit-box-shadow: inset 0px 0px 0px 0px #c1ed9c;
            box-shadow: inset 0px 0px 0px 0px #c1ed9c;
            background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #9dce2c), color-stop(1, #8cb82b));
            background: -moz-linear-gradient(center top, #9dce2c 5%, #8cb82b 100%);
            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#9dce2c', endColorstr='#8cb82b');
            background-color: #9dce2c;
            -webkit-border-top-left-radius: 22px;
            -moz-border-radius-topleft: 22px;
            border-top-left-radius: 22px;
            -webkit-border-top-right-radius: 22px;
            -moz-border-radius-topright: 22px;
            border-top-right-radius: 22px;
            -webkit-border-bottom-right-radius: 22px;
            -moz-border-radius-bottomright: 22px;
            border-bottom-right-radius: 22px;
            -webkit-border-bottom-left-radius: 22px;
            -moz-border-radius-bottomleft: 22px;
            border-bottom-left-radius: 22px;
            text-indent: 0;
            border: 1px solid #83c41a;
            display: inline-block;
            color: #ffffff;
            font-family: Arial;
            font-size: 35px;
            font-weight: bold;
            font-style: normal;
            height: 40px;
            line-height: 40px;
            width: 83px;
            text-decoration: none;
            text-align: center;
            text-shadow: 0px 0px 0px #689324;
        }

        .dateNavButton:hover {
            background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #8cb82b), color-stop(1, #9dce2c));
            background: -moz-linear-gradient(center top, #8cb82b 5%, #9dce2c 100%);
            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#8cb82b', endColorstr='#9dce2c');
            background-color: #8cb82b;
        }

        .dateNavButton:active {
            position: relative;
            top: 1px;
        }
    </style>

</h:head>
<h:body style="background-color: #EFEFEF; text-align:center">
<script>
    (function (i, s, o, g, r, a, m) {
        i['GoogleAnalyticsObject'] = r;
        i[r] = i[r] || function () {
            (i[r].q = i[r].q || []).push(arguments)
        }, i[r].l = 1 * new Date();
        a = s.createElement(o),
                m = s.getElementsByTagName(o)[0];
        a.async = 1;
        a.src = g;
        m.parentNode.insertBefore(a, m)
    })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

    ga('create', 'UA-48024215-1', 'playtennis.se');
    ga('send', 'pageview');

</script>

<div id="fb-root"></div>
<script>(function (d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s);
    js.id = id;
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
    fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>

<p:ajaxStatus onstart="block();" onsuccess="$.unblockUI()"/>

<div class="topcontainer">
    <h1>Spela tennis - Stockholm</h1>

    <h2>En sammanställning av tennishallar och lediga tennistider i Stockholm</h2>
</div>

<div class="container">
<div style="display:block;margin-left:15px; text-align: left;" class="fb-like" data-href="http://www.playtennis.se"
     data-layout="standard" data-action="like" data-show-faces="false" data-share="true"></div>
<h:form id="tennisForm">
<div align="center" style="margin-bottom: 10px;">
    <table>
        <tr>
            <td>
                <a4j:commandLink styleClass="dateNavButton hightlightTxt" id="previousDay"
                                 disabled="#{tennisFinderBean.previousDateButtonDisabled}"
                                 action="#{tennisFinderBean.previousDay}" value="&lt;">
                    <f:ajax render="data @this calendarPanel dayStringPanel"/>
                </a4j:commandLink>
            </td>
            <td>
                <a4j:outputPanel layout="inline" id="dayStringPanel">
                    <h:outputText value="#{tennisFinderBean.currentDay}"
                                  style="font-size: 3em; vertical-align:middle;"/>
                </a4j:outputPanel>
                <a4j:outputPanel layout="inline" style="padding-left:10px;" id="calendarPanel">
                    <rich:calendar value="#{tennisFinderBean.date}" id="calendar"
                                   popup="true"
                                   showApplyButton="false" cellWidth="24px" cellHeight="22px"
                                   inputStyle="height:37px; width:170px; font-size: 3em"
                                   buttonClass="calendarbutton"
                                   style="width:50px; margin-bottom:10px"
                                   datePattern="d MMM yyyy"
                                   locale="sv/SE">
                        <f:ajax event="change" listener="#{tennisFinderBean.refreshData()}" render="data previousDay"/>
                    </rich:calendar>
                </a4j:outputPanel>
            </td>
            <td>
                <a4j:commandLink id="nextDay" styleClass="dateNavButton hightlightTxt" value="&gt;"
                                 action="#{tennisFinderBean.nextDay}">
                    <f:ajax render="data calendarPanel previousDay dayStringPanel"/>
                </a4j:commandLink>
            </td>
        </tr>
    </table>
</div>
<div align="center">
<h:panelGroup id="data">
<table>
<tr>
    <td></td>
    <td style="text-align: center"><a target="_blank" href="http://www.stockholmtennis.se">Södermalm</a></td>
    <td style="text-align: center"><a target="_blank" href="http://www.sparvagens.tk">Kärrtorp</a></td>
    <td style="text-align: center"><a target="_blank" href="http://www.solnatenniscenter.se">Solna</a></td>
    <td style="text-align: center"><a target="_blank" href="http://www.stockholmtennis.se">J Lundqvist</a></td>
    <td style="text-align: center"><a target="_blank" href="http://www.salk.se">Salkhallen</a></td>
    <td style="text-align: center"><a target="_blank" href="http://www.tennisstadion.se">Tennisstadion</a></td>
    <td style="text-align: center"><a target="_blank"
                                      href="http://www8.idrottonline.se/TSKMalmen-Tennis/">TSK Malmen</a></td>
    <td style="text-align: center"><a target="_blank" href="http://www.sundbybergsrackethall.se/">Sundbyberg</a></td>
    <!--<td style="text-align: center"><a target="_blank" href="http://www.smedslattentennis.se/">Smedslätten</a></td>-->
    <td style="text-align: center"><a target="_blank" href="http://www.farstatennis.net/">Farsta</a></td>
    <td style="text-align: center"><a target="_blank"
                                      href="http://www.tyresosportcenter.se/sportcentret/tennis">Tyresö</a></td>

</tr>
<tr>
    <td></td>
    <td class="maplink"><a target="_blank"
                           href="https://maps.google.se/maps?q=hellas+tennis&amp;hl=sv&amp;sll=59.332425,17.982084&amp;sspn=0.009161,0.027874&amp;t=m&amp;z=16&amp;iwloc=A"><img
            alt="Hitta till Hellas tennishall" src="maplink.jpg" width="20px" height="20px"/></a></td>
    <td class="maplink"><a target="_blank"
                           href="https://maps.google.se/maps?q=Sp%C3%A5rv%C3%A4gens+Tennisklubb&amp;ie=UTF8&amp;oe=utf-8&amp;client=firefox-a&amp;channel=sb&amp;fb=1&amp;gl=se&amp;hq=sp%C3%A5rv%C3%A4gens+tennisklubb&amp;cid=4690120020446829206&amp;t=m&amp;z=16"><img
            alt="Hitta till Kärrtorps tennishall" src="maplink.jpg" width="20px" height="20px"/></a></td>
    <td class="maplink"><a target="_blank"
                           href="https://maps.google.se/maps?q=Solna+tenniscenter&amp;hl=sv&amp;ll=59.376021,18.006506&amp;spn=0.036596,0.111494&amp;sll=59.348639,18.025131&amp;sspn=0.036625,0.111494&amp;hq=Solna+tenniscenter&amp;t=m&amp;z=14&amp;iwloc=A"><img
            alt="Hitta hit" src="maplink.jpg" width="20px" height="20px"/></a></td>
    <td class="maplink"><a target="_blank"
                           href="https://maps.google.se/maps?q=CL+Tennis+AB,+Elersv%C3%A4gen+37,+Stockholm&amp;hl=sv&amp;ie=UTF8&amp;sll=59.337578,18.003116&amp;sspn=0.009159,0.027874&amp;oq=CL++Elersv%C3%A4gen+37,+Stockholm&amp;hq=CL+Tennis+AB,&amp;hnear=Elersv%C3%A4gen+37,+112+51+Stockholm&amp;t=m&amp;z=16"><img
            alt="Hitta till Stockholms tennishall" src="maplink.jpg" width="20px" height="20px"/></a></td>
    <td class="maplink"><a target="_blank"
                           href="https://maps.google.se/maps?q=Stockholms+Allm%C3%A4nna+Lawntennisklubb,+Gustavslundsv%C3%A4gen,+Bromma&amp;hl=sv&amp;ie=UTF8&amp;sll=59.326142,17.982052&amp;sspn=0.293194,0.891953&amp;oq=stockholms+alm%C3%A4nna+la&amp;hq=Stockholms+Allm%C3%A4nna+Lawntennisklubb,&amp;hnear=Gustavslundsv%C3%A4gen,+167+51&amp;t=m&amp;z=16"><img
            alt="Hitta till Salkhallen" src="maplink.jpg" width="20px" height="20px"/></a></td>
    <td class="maplink"><a target="_blank"
                           href="https://maps.google.se/maps?q=Tennisstadion,+Stockholm+S%C3%B6dra+fiskartorpsv%C3%A4gen&amp;hl=sv&amp;ie=UTF8&amp;sll=59.348929,18.083035&amp;sspn=0.009156,0.027874&amp;t=m&amp;z=16&amp;iwloc=A"><img
            alt="Hitta till tennisstadion" src="maplink.jpg" width="20px" height="20px"/></a></td>
    <td class="maplink"><a target="_blank"
                           href="https://www.google.se/maps/place/TSK+Malmen/@59.348899,18.081128,17z/data=!3m1!4b1!4m2!3m1!1s0x465f9d3f5dbf0deb:0x2236bdabe7728a7"><img
            alt="Hitta till TSK Malmen" src="maplink.jpg" width="20px" height="20px"/></a></td>

    <td class="maplink"><a target="_blank"
                           href="https://www.google.se/maps/place/Sundbybergs+Tennisklubb/@59.3767707,17.9757365,17z/data=!4m5!1m2!2m1!1ssundbybergs+rackethall!3m1!1s0x0:0x33cd0bc120f9754b"><img
            alt="Hitta till Sundbybergs Tennisklubb" src="maplink.jpg" width="20px" height="20px"/></a></td>
    <!--<td class="maplink"><a target="_blank"
                           href="https://www.google.se/maps/place/Smedsl%C3%A4ttens+Tennisbanor+AB/@59.318983,17.967049,15z/data=!4m5!1m2!2m1!1ssmedsl%C3%A4tten+tennis!3m1!1s0x0:0xf15a3e19f6fa4159"><img
            alt="Hitta till Smedslättens Tennisbanor" src="maplink.jpg" width="20px" height="20px"/></a></td>-->
    <td class="maplink"><a target="_blank"
                           href="https://www.google.se/maps/place/Farsta+Tennisklubb/@59.261711,18.072434,17z/data=!3m1!4b1!4m2!3m1!1s0x465f79c4be5839ef:0x9ef92230d44144e8"><img
            alt="Hitta till Farsta Tennisklubb" src="maplink.jpg" width="20px" height="20px"/></a></td>
    <td class="maplink"><a target="_blank"
                           href="https://www.google.se/maps/place/Tyres%C3%B6+Rackethall/@59.248131,18.239112,17z/data=!3m1!4b1!4m2!3m1!1s0x465f7edc2ab33591:0x25591327736ddf6b"><img
            alt="Hitta till Tyresö sportcenter" src="maplink.jpg" width="20px" height="20px"/></a></td>

</tr>

<tr>
<td valign="top">
    <table width="40px">
        <tr>
            <td height="20px" width="100" valign="top"
                style="vertical-align: middle">07 - 08
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">08 - 09
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">09 - 10
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">10 - 11
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">11 - 12
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">12 - 13
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">13 - 14
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">14 - 15
            </td>
        </tr>
        <tr>
            <td height="20px" width="70 em" valign="top"
                style="vertical-align: middle">15 - 16
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">16 - 17
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">17 - 18
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">18 - 19
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">19 - 20
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">20 - 21
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">21 - 22
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">22 - 23
            </td>
        </tr>
    </table>
</td>

<ui:repeat var="venueAvailability" value="#{tennisFinderBean.venueAvailabilityList}"
           varStatus="status">
    <td>
        <table width="80px" class="availabilityTable">

            <ui:repeat var="hourAvailability"
                       value="#{venueAvailability.hourAvailabilityList}"
                       varStatus="status">
                <tr>
                    <td height="20px"
                        style="text-align: center; vertical-align: middle; border-radius: 3px 3px 3px 3px;"
                        bgcolor="#{tennisFinderBean.getStatusColor(hourAvailability.bookingStatus)}">
                        <h:outputLink style="vertical-align: middle;"
                                      rendered="#{tennisFinderBean.getBookable(hourAvailability.bookingStatus)}"
                                      value="#{hourAvailability.bookingLink}"
                                      target="_blank"
                                      title="#{tennisFinderBean.getBookingLinkTitle(hourAvailability.bookingStatus)}">
                            <span style="color: gray"><h:outputText value="#{tennisFinderBean.getBookingText(hourAvailability.bookingStatus)}" escape="false"/></span>
                        </h:outputLink>
                    </td>
                </tr>
            </ui:repeat>
        </table>
    </td>
</ui:repeat>

<td valign="top">
    <table width="40px">
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">07 - 08
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">08 - 09
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">09 - 10
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">10 - 11
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">11 - 12
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">12 - 13
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">13 - 14
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">14 - 15
            </td>
        </tr>
        <tr>
            <td height="20px" width="70 em" valign="top"
                style="vertical-align: middle">15 - 16
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">16 - 17
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">17 - 18
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">18 - 19
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">19 - 20
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">20 - 21
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">21 - 22
            </td>
        </tr>
        <tr>
            <td height="20px" width="30px" valign="top"
                style="vertical-align: middle">22 - 23
            </td>
        </tr>
    </table>
</td>
</tr>
</table>
</h:panelGroup>
</div>
</h:form>

<div style="text-align: center;"><i class="fa fa-home"></i> = Inomhus <i class="fa fa-sun-o"></i> = Utomhus</div>
</div>
</h:body>
</html>
